package org.example.uuadb.service.impl;

import org.example.uuadb.entity.UserInfo;
import org.example.uuadb.mapper.UserMapper;
import org.example.uuadb.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author : yurui
 * @date : 2024/6/2
 * @TIME : 19:52
 * @project : AuthDemo
 */

@Service
public class UserServiceImpl implements UserService {

    private UserMapper userMapper;

    public UserServiceImpl(UserMapper userMapper){
        this.userMapper = userMapper;
    }

    @Override
    @Transactional(rollbackFor = Exception.class)
    public UserInfo selectUserByName(String username) {
        return userMapper.selectUserByName(username);
    }
}
